import request from '@/utils/request'

// 获取优惠券列表
export function getCouponList(params) {
  return request({
    url: '/api/back/coupon/list',
    method: 'get',
    params
  })
}

// 获取已领取优惠券
export function getUsedCouponList(params) {
    return request({
      url: '/api/back/coupon/user',
      method: 'get',
      params
    })
  }

// 添加品牌
export function addCoupon(data) {
    return request({
      url: '/api/back/coupon/create',
      method: 'post',
      data
    })
  }

  // 删除已失效优惠券
export function delCoupon(data) {
    return request({
      url: '/api/back/coupon/delete',
      method: 'post',
      data
    })
  }

    // 启用禁用优惠券
export function openCoupon(data) {
    return request({
      url: '/api/back/coupon/active',
      method: 'post',
      data
    })
  }

// 获取已核销优惠券列表
export function getVerificCouponList(params) {
  return request({
    url: '/api/back/designer/coupon',
    method: 'get',
    params
  })
}

// 获取已核销优惠券列表里面的已领取和未核销
export function getDesignerVerificCoupon(params) {
  return request({
    url: '/api/back/designer/coupon/get',
    method: 'get',
    params
  })
}